// const runtimeConfig = useRuntimeConfig();


// 获取二维数组
export const getDimensionaArr = (arr, n) => {
  if (!Array.isArray(arr)) return []
  const newArr = []
  for (let i = 0; i < arr.length; i += n) {
    newArr.push(arr.slice(i, i + n));
  }
  return newArr
}
export const debounce = (fn, delay) => {

  let timer = null;
  return () => {
    if (timer) {
    } else {
      fn();
      timer = setTimeout(() => {
        clearTimeout(timer);
        timer = null;
      }, delay);
    }
  };
}